package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbGoodOrderMapper;
import com.ruoyi.system.domain.TbGoodOrder;
import com.ruoyi.system.service.ITbGoodOrderService;

/**
 * 商品订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-11
 */
@Service
public class TbGoodOrderServiceImpl implements ITbGoodOrderService 
{
    @Autowired
    private TbGoodOrderMapper tbGoodOrderMapper;

    /**
     * 查询商品订单
     * 
     * @param id 商品订单主键
     * @return 商品订单
     */
    @Override
    public TbGoodOrder selectTbGoodOrderById(Long id)
    {
        return tbGoodOrderMapper.selectTbGoodOrderById(id);
    }

    /**
     * 查询商品订单列表
     * 
     * @param tbGoodOrder 商品订单
     * @return 商品订单
     */
    @Override
    public List<TbGoodOrder> selectTbGoodOrderList(TbGoodOrder tbGoodOrder)
    {
        return tbGoodOrderMapper.selectTbGoodOrderList(tbGoodOrder);
    }

    /**
     * 新增商品订单
     * 
     * @param tbGoodOrder 商品订单
     * @return 结果
     */
    @Override
    public int insertTbGoodOrder(TbGoodOrder tbGoodOrder)
    {
        return tbGoodOrderMapper.insertTbGoodOrder(tbGoodOrder);
    }

    /**
     * 修改商品订单
     * 
     * @param tbGoodOrder 商品订单
     * @return 结果
     */
    @Override
    public int updateTbGoodOrder(TbGoodOrder tbGoodOrder)
    {
        return tbGoodOrderMapper.updateTbGoodOrder(tbGoodOrder);
    }

    /**
     * 批量删除商品订单
     * 
     * @param ids 需要删除的商品订单主键
     * @return 结果
     */
    @Override
    public int deleteTbGoodOrderByIds(Long[] ids)
    {
        return tbGoodOrderMapper.deleteTbGoodOrderByIds(ids);
    }

    /**
     * 删除商品订单信息
     * 
     * @param id 商品订单主键
     * @return 结果
     */
    @Override
    public int deleteTbGoodOrderById(Long id)
    {
        return tbGoodOrderMapper.deleteTbGoodOrderById(id);
    }
}
